3.54 \(\int \frac{(A+B \sin (e+f x)) (c-c \sin (e+f x))^2}{a+a \sin (e+f x)} \, dx\)

Optimal. Leaf size=118 \[ -\frac{a^2 c^2 (A-B) \cos ^5(e+f x)}{f (a \sin (e+f x)+a)^3}-\frac{3 c^2 (2 A-3 B) \cos (e+f x)}{2 a f}-\frac{c^2 (2 A-3 B) \cos ^3(e+f x)}{2 f (a \sin (e+f x)+a)}-\frac{3 c^2 x (2 A-3 B)}{2 a} \]

[Out]

(-3*(2*A - 3*B)*c^2*x)/(2*a) - (3*(2*A - 3*B)*c^2*Cos[e + f*x])/(2*a*f) - (a^2*(A - B)*c^2*Cos[e + f*x]^5)/(f*
(a + a*Sin[e + f*x])^3) - ((2*A - 3*B)*c^2*Cos[e + f*x]^3)/(2*f*(a + a*Sin[e + f*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.27847, antiderivative size = 118, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 36, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.139, Rules used = {2967, 2859, 2679, 2682, 8} \[ -\frac{a^2 c^2 (A-B) \cos ^5(e+f x)}{f (a \sin (e+f x)+a)^3}-\frac{3 c^2 (2 A-3 B) \cos (e+f x)}{2 a f}-\frac{c^2 (2 A-3 B) \cos ^3(e+f x)}{2 f (a \sin (e+f x)+a)}-\frac{3 c^2 x (2 A-3 B)}{2 a} \]

Antiderivative was successfully verified.

[In]

Int[((A + B*Sin[e + f*x])*(c - c*Sin[e + f*x])^2)/(a + a*Sin[e + f*x]),x]

[Out]

(-3*(2*A - 3*B)*c^2*x)/(2*a) - (3*(2*A - 3*B)*c^2*Cos[e + f*x])/(2*a*f) - (a^2*(A - B)*c^2*Cos[e + f*x]^5)/(f*
(a + a*Sin[e + f*x])^3) - ((2*A - 3*B)*c^2*Cos[e + f*x]^3)/(2*f*(a + a*Sin[e + f*x]))

Rule 2967

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*sin[(e_
.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a^m*c^m, Int[Cos[e + f*x]^(2*m)*(c + d*Sin[e + f*x])^(n - m)*(A + B
*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && I
ntegerQ[m] &&  !(IntegerQ[n] && ((LtQ[m, 0] && GtQ[n, 0]) || LtQ[0, n, m] || LtQ[m, n, 0]))

Rule 2859

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.)
+ (f_.)*(x_)]), x_Symbol] :> Simp[((b*c - a*d)*(g*Cos[e + f*x])^(p + 1)*(a + b*Sin[e + f*x])^m)/(a*f*g*(2*m +
p + 1)), x] + Dist[(a*d*m + b*c*(m + p + 1))/(a*b*(2*m + p + 1)), Int[(g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^
(m + 1), x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && EqQ[a^2 - b^2, 0] && (LtQ[m, -1] || ILtQ[Simplify[
m + p], 0]) && NeQ[2*m + p + 1, 0]

Rule 2679

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[(g*(g*
Cos[e + f*x])^(p - 1)*(a + b*Sin[e + f*x])^(m + 1))/(b*f*(m + p)), x] + Dist[(g^2*(p - 1))/(a*(m + p)), Int[(g
*Cos[e + f*x])^(p - 2)*(a + b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{a, b, e, f, g}, x] && EqQ[a^2 - b^2, 0]
&& LtQ[m, -1] && GtQ[p, 1] && (GtQ[m, -2] || EqQ[2*m + p + 1, 0] || (EqQ[m, -2] && IntegerQ[p])) && NeQ[m + p,
 0] && IntegersQ[2*m, 2*p]

Rule 2682

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(g*(g*Cos[e
 + f*x])^(p - 1))/(b*f*(p - 1)), x] + Dist[g^2/a, Int[(g*Cos[e + f*x])^(p - 2), x], x] /; FreeQ[{a, b, e, f, g
}, x] && EqQ[a^2 - b^2, 0] && GtQ[p, 1] && IntegerQ[2*p]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \frac{(A+B \sin (e+f x)) (c-c \sin (e+f x))^2}{a+a \sin (e+f x)} \, dx &=\left (a^2 c^2\right ) \int \frac{\cos ^4(e+f x) (A+B \sin (e+f x))}{(a+a \sin (e+f x))^3} \, dx\\ &=-\frac{a^2 (A-B) c^2 \cos ^5(e+f x)}{f (a+a \sin (e+f x))^3}-\left (a (2 A-3 B) c^2\right ) \int \frac{\cos ^4(e+f x)}{(a+a \sin (e+f x))^2} \, dx\\ &=-\frac{a^2 (A-B) c^2 \cos ^5(e+f x)}{f (a+a \sin (e+f x))^3}-\frac{(2 A-3 B) c^2 \cos ^3(e+f x)}{2 f (a+a \sin (e+f x))}-\frac{1}{2} \left (3 (2 A-3 B) c^2\right ) \int \frac{\cos ^2(e+f x)}{a+a \sin (e+f x)} \, dx\\ &=-\frac{3 (2 A-3 B) c^2 \cos (e+f x)}{2 a f}-\frac{a^2 (A-B) c^2 \cos ^5(e+f x)}{f (a+a \sin (e+f x))^3}-\frac{(2 A-3 B) c^2 \cos ^3(e+f x)}{2 f (a+a \sin (e+f x))}-\frac{\left (3 (2 A-3 B) c^2\right ) \int 1 \, dx}{2 a}\\ &=-\frac{3 (2 A-3 B) c^2 x}{2 a}-\frac{3 (2 A-3 B) c^2 \cos (e+f x)}{2 a f}-\frac{a^2 (A-B) c^2 \cos ^5(e+f x)}{f (a+a \sin (e+f x))^3}-\frac{(2 A-3 B) c^2 \cos ^3(e+f x)}{2 f (a+a \sin (e+f x))}\\ \end{align*}

Mathematica [A]  time = 1.27359, size = 188, normalized size = 1.59 \[ -\frac{c^2 (\sin (e+f x)-1)^2 \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right ) \left (\cos \left (\frac{1}{2} (e+f x)\right ) (6 (2 A-3 B) (e+f x)+4 (A-3 B) \cos (e+f x)+B \sin (2 (e+f x)))+\sin \left (\frac{1}{2} (e+f x)\right ) (4 (A-3 B) \cos (e+f x)+4 A (3 e+3 f x-8)-2 B (9 e+9 f x-16)+B \sin (2 (e+f x)))\right )}{4 a f (\sin (e+f x)+1) \left (\cos \left (\frac{1}{2} (e+f x)\right )-\sin \left (\frac{1}{2} (e+f x)\right )\right )^4} \]

Antiderivative was successfully verified.

[In]

Integrate[((A + B*Sin[e + f*x])*(c - c*Sin[e + f*x])^2)/(a + a*Sin[e + f*x]),x]

[Out]

-(c^2*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])*(-1 + Sin[e + f*x])^2*(Cos[(e + f*x)/2]*(6*(2*A - 3*B)*(e + f*x) +
 4*(A - 3*B)*Cos[e + f*x] + B*Sin[2*(e + f*x)]) + Sin[(e + f*x)/2]*(4*A*(-8 + 3*e + 3*f*x) - 2*B*(-16 + 9*e +
9*f*x) + 4*(A - 3*B)*Cos[e + f*x] + B*Sin[2*(e + f*x)])))/(4*a*f*(Cos[(e + f*x)/2] - Sin[(e + f*x)/2])^4*(1 +
Sin[e + f*x]))

________________________________________________________________________________________

Maple [B]  time = 0.106, size = 299, normalized size = 2.5 \begin{align*}{\frac{B{c}^{2}}{af} \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) \right ) ^{3} \left ( 1+ \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) \right ) ^{2} \right ) ^{-2}}-2\,{\frac{{c}^{2} \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{2}A}{af \left ( 1+ \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{2} \right ) ^{2}}}+6\,{\frac{{c}^{2} \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{2}B}{af \left ( 1+ \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{2} \right ) ^{2}}}-{\frac{B{c}^{2}}{af}\tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) \left ( 1+ \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) \right ) ^{2} \right ) ^{-2}}-2\,{\frac{A{c}^{2}}{af \left ( 1+ \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{2} \right ) ^{2}}}+6\,{\frac{B{c}^{2}}{af \left ( 1+ \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{2} \right ) ^{2}}}+9\,{\frac{{c}^{2}\arctan \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) B}{af}}-6\,{\frac{{c}^{2}\arctan \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) A}{af}}-8\,{\frac{A{c}^{2}}{af \left ( \tan \left ( 1/2\,fx+e/2 \right ) +1 \right ) }}+8\,{\frac{B{c}^{2}}{af \left ( \tan \left ( 1/2\,fx+e/2 \right ) +1 \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A+B*sin(f*x+e))*(c-c*sin(f*x+e))^2/(a+a*sin(f*x+e)),x)

[Out]

1/f*c^2/a/(1+tan(1/2*f*x+1/2*e)^2)^2*tan(1/2*f*x+1/2*e)^3*B-2/f*c^2/a/(1+tan(1/2*f*x+1/2*e)^2)^2*tan(1/2*f*x+1
/2*e)^2*A+6/f*c^2/a/(1+tan(1/2*f*x+1/2*e)^2)^2*tan(1/2*f*x+1/2*e)^2*B-1/f*c^2/a/(1+tan(1/2*f*x+1/2*e)^2)^2*B*t
an(1/2*f*x+1/2*e)-2/f*c^2/a/(1+tan(1/2*f*x+1/2*e)^2)^2*A+6/f*c^2/a/(1+tan(1/2*f*x+1/2*e)^2)^2*B+9/f*c^2/a*arct
an(tan(1/2*f*x+1/2*e))*B-6/f*c^2/a*arctan(tan(1/2*f*x+1/2*e))*A-8/f*c^2/a/(tan(1/2*f*x+1/2*e)+1)*A+8/f*c^2/a/(
tan(1/2*f*x+1/2*e)+1)*B

________________________________________________________________________________________

Maxima [B]  time = 1.49755, size = 821, normalized size = 6.96 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sin(f*x+e))*(c-c*sin(f*x+e))^2/(a+a*sin(f*x+e)),x, algorithm="maxima")

[Out]

(B*c^2*((sin(f*x + e)/(cos(f*x + e) + 1) + 5*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 3*sin(f*x + e)^3/(cos(f*x +
 e) + 1)^3 + 3*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 4)/(a + a*sin(f*x + e)/(cos(f*x + e) + 1) + 2*a*sin(f*x +
 e)^2/(cos(f*x + e) + 1)^2 + 2*a*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + a*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 +
 a*sin(f*x + e)^5/(cos(f*x + e) + 1)^5) + 3*arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a) - 2*A*c^2*((sin(f*x + e
)/(cos(f*x + e) + 1) + sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 2)/(a + a*sin(f*x + e)/(cos(f*x + e) + 1) + a*sin
(f*x + e)^2/(cos(f*x + e) + 1)^2 + a*sin(f*x + e)^3/(cos(f*x + e) + 1)^3) + arctan(sin(f*x + e)/(cos(f*x + e)
+ 1))/a) + 4*B*c^2*((sin(f*x + e)/(cos(f*x + e) + 1) + sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 2)/(a + a*sin(f*x
 + e)/(cos(f*x + e) + 1) + a*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + a*sin(f*x + e)^3/(cos(f*x + e) + 1)^3) + ar
ctan(sin(f*x + e)/(cos(f*x + e) + 1))/a) - 4*A*c^2*(arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a + 1/(a + a*sin(f
*x + e)/(cos(f*x + e) + 1))) + 2*B*c^2*(arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a + 1/(a + a*sin(f*x + e)/(cos
(f*x + e) + 1))) - 2*A*c^2/(a + a*sin(f*x + e)/(cos(f*x + e) + 1)))/f

________________________________________________________________________________________

Fricas [A]  time = 1.41923, size = 423, normalized size = 3.58 \begin{align*} \frac{B c^{2} \cos \left (f x + e\right )^{3} - 3 \,{\left (2 \, A - 3 \, B\right )} c^{2} f x - 2 \,{\left (A - 3 \, B\right )} c^{2} \cos \left (f x + e\right )^{2} - 8 \,{\left (A - B\right )} c^{2} -{\left (3 \,{\left (2 \, A - 3 \, B\right )} c^{2} f x +{\left (10 \, A - 13 \, B\right )} c^{2}\right )} \cos \left (f x + e\right ) -{\left (3 \,{\left (2 \, A - 3 \, B\right )} c^{2} f x + B c^{2} \cos \left (f x + e\right )^{2} +{\left (2 \, A - 5 \, B\right )} c^{2} \cos \left (f x + e\right ) - 8 \,{\left (A - B\right )} c^{2}\right )} \sin \left (f x + e\right )}{2 \,{\left (a f \cos \left (f x + e\right ) + a f \sin \left (f x + e\right ) + a f\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sin(f*x+e))*(c-c*sin(f*x+e))^2/(a+a*sin(f*x+e)),x, algorithm="fricas")

[Out]

1/2*(B*c^2*cos(f*x + e)^3 - 3*(2*A - 3*B)*c^2*f*x - 2*(A - 3*B)*c^2*cos(f*x + e)^2 - 8*(A - B)*c^2 - (3*(2*A -
 3*B)*c^2*f*x + (10*A - 13*B)*c^2)*cos(f*x + e) - (3*(2*A - 3*B)*c^2*f*x + B*c^2*cos(f*x + e)^2 + (2*A - 5*B)*
c^2*cos(f*x + e) - 8*(A - B)*c^2)*sin(f*x + e))/(a*f*cos(f*x + e) + a*f*sin(f*x + e) + a*f)

________________________________________________________________________________________

Sympy [A]  time = 14.9269, size = 2365, normalized size = 20.04 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sin(f*x+e))*(c-c*sin(f*x+e))**2/(a+a*sin(f*x+e)),x)

[Out]

Piecewise((-6*A*c**2*f*x*tan(e/2 + f*x/2)**5/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*ta
n(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) - 6*A*c**2*f*x*tan(e/2 + f*x/2
)**4/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/
2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) - 12*A*c**2*f*x*tan(e/2 + f*x/2)**3/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f
*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f)
 - 12*A*c**2*f*x*tan(e/2 + f*x/2)**2/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 +
f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) - 6*A*c**2*f*x*tan(e/2 + f*x/2)/(2*a*f
*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a
*f*tan(e/2 + f*x/2) + 2*a*f) - 6*A*c**2*f*x/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan
(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) + 16*A*c**2*tan(e/2 + f*x/2)**5
/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**
2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) + 28*A*c**2*tan(e/2 + f*x/2)**3/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2
 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) - 4*A*c
**2*tan(e/2 + f*x/2)**2/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4
*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) + 12*A*c**2*tan(e/2 + f*x/2)/(2*a*f*tan(e/2 + f*x/2
)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x
/2) + 2*a*f) - 4*A*c**2/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4
*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) + 9*B*c**2*f*x*tan(e/2 + f*x/2)**5/(2*a*f*tan(e/2 +
 f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2
 + f*x/2) + 2*a*f) + 9*B*c**2*f*x*tan(e/2 + f*x/2)**4/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 +
 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) + 18*B*c**2*f*x*tan(e
/2 + f*x/2)**3/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(
e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) + 18*B*c**2*f*x*tan(e/2 + f*x/2)**2/(2*a*f*tan(e/2 + f*x/2)*
*5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2
) + 2*a*f) + 9*B*c**2*f*x*tan(e/2 + f*x/2)/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(
e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) + 9*B*c**2*f*x/(2*a*f*tan(e/2 +
f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2
+ f*x/2) + 2*a*f) - 18*B*c**2*tan(e/2 + f*x/2)**5/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a
*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) - 22*B*c**2*tan(e/2 + f*x
/2)**3/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*
x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) + 6*B*c**2*tan(e/2 + f*x/2)**2/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*ta
n(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) -
8*B*c**2*tan(e/2 + f*x/2)/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 +
 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) + 10*B*c**2/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*ta
n(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f), N
e(f, 0)), (x*(A + B*sin(e))*(-c*sin(e) + c)**2/(a*sin(e) + a), True))

________________________________________________________________________________________

Giac [A]  time = 1.18918, size = 221, normalized size = 1.87 \begin{align*} -\frac{\frac{3 \,{\left (2 \, A c^{2} - 3 \, B c^{2}\right )}{\left (f x + e\right )}}{a} + \frac{16 \,{\left (A c^{2} - B c^{2}\right )}}{a{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 1\right )}} - \frac{2 \,{\left (B c^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} - 2 \, A c^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 6 \, B c^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - B c^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 2 \, A c^{2} + 6 \, B c^{2}\right )}}{{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 1\right )}^{2} a}}{2 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sin(f*x+e))*(c-c*sin(f*x+e))^2/(a+a*sin(f*x+e)),x, algorithm="giac")

[Out]

-1/2*(3*(2*A*c^2 - 3*B*c^2)*(f*x + e)/a + 16*(A*c^2 - B*c^2)/(a*(tan(1/2*f*x + 1/2*e) + 1)) - 2*(B*c^2*tan(1/2
*f*x + 1/2*e)^3 - 2*A*c^2*tan(1/2*f*x + 1/2*e)^2 + 6*B*c^2*tan(1/2*f*x + 1/2*e)^2 - B*c^2*tan(1/2*f*x + 1/2*e)
 - 2*A*c^2 + 6*B*c^2)/((tan(1/2*f*x + 1/2*e)^2 + 1)^2*a))/f